<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Keywords" content="惠信钱包，金融">
<meta name="description" content="描述描述描述" />
<%@include file="/WEB-INF/base/commRoot.jsp"%>
<link rel="stylesheet" href="/css/public.css" />
<link rel="stylesheet" href="/css/style.css" />
<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="/js/rsa/RSA.js"></script> 
<script type="text/javascript" src="/js/rsa/BigInt.js"></script> 
<script type="text/javascript" src="/js/rsa/Barrett.js"></script> 
<script type="text/javascript" src="/js/rsa/RsaDataUtil.js"></script>
<script type="text/javascript" src="/js/jquery.validate.js"></script>
<script type="text/javascript" src="/js/win_layer/win_layer.js"></script>
<script type="text/javascript" src="/js/view/fundRecord/todo_money.js"></script>
<script type="text/javascript" src="/js/view/account/sms.js"></script>

<title>提现</title>
<script type="text/javascript">
		function checkBindThing(){ 
			var alertStr="您好，在惠信钱包提现，需要先通过绑定手机号和银行卡、实名认证、设置支付密码。目前您账户";
			var str=alertStr;
			if ('<s:property value="#request.cash"/>' == 0.00) {//余额不足
				fobiddenOnclick();
			}if('<s:property value="#request.nohaveTele"/>'=="ok"){
				alertStr+="还未绑定手机号码";
			}if('<s:property value="#request.nohaveBankId"/>'=='ok'){
				if(str!=alertStr){
					alertStr+="、银行卡";
				}else{
					alertStr+="还未绑定银行卡";
				}
			}if('<s:property value="#request.isNeedApprove"/>'=='ok'){
				if(str==alertStr){
					alertStr+="还未实名认证";
				}else{
					alertStr+="、实名认证";
				} 
			} if('<s:property value="#request.nohavepayPassword"/>'=="ok"){
				if(str==alertStr){
					alertStr+="还未设置支付密码";
				}else{
					alertStr+="和设置支付密码";
				} 
			} 
			if(alertStr!=str){ 
				fobiddenOnclick();
				layer.alert(alertStr+"[请点击确定进入安全中心设置]",8,function(){
			    	location.href = ctx_root+'/account/safeAction_safe.action';
			    });
			}
			if('<s:property value="#request.isOver24H"/>'=="no"){
				fobiddenOnclick();
				layer.alert("为了您的资金安全，修改银行卡信息后，"+'<s:property value='#request.syschangeBankcard.dataValue'/>'+"小时内不允许提现",8,function(){
					  location.href="userLoginSuccessAction_toMyPurse.action";
			    });
			}
		}
		 
		function fobiddenOnclick(){
			$('#towithdrwa').removeClass('btn');
			$('#towithdrwa').addClass('grey_btn');
			$("#towithdrwa").unbind("click");
			wflag=false;
		}
		
</script>
</head>
<body onload="checkBindThing()">
<input id="module" type="hidden" value="<s:property value='#application.module'/>">
<input id="empoent" type="hidden" value="<s:property value='#application.empoent'/>">
	<!--header-->
	<%@include file="/head.jsp"%>
	<!--/header-->
	<!--main-->
	<div class="main_bg">
		<div class="money_operat">
<!-- 			<h3> -->
<!-- 				<a href="javascript:void(0)" onclick="history.back();" class="return v">返回</a> <em class="v">提现</em> -->
<!-- 				<span class="line v"></span> -->
<!-- 			</h3> -->
			
			<ul class="money_operat_list">
				<li class="clearfix"><label>提现至银行卡：</label>
					<dl class="withdrawals_card l">
						<dd>
						    <s:hidden id="isSetPayPasswordw" name="#request.nohavepayPassword"></s:hidden>
							<s:hidden id="bankcode" name="#request.bankCode"></s:hidden>
							<s:hidden id="nohaveTele" name="#request.nohaveTele"></s:hidden>
							<s:hidden id="isNeedApprove" name="#request.isNeedApprove"></s:hidden>
							<s:hidden id="userId" name="#request.userId"></s:hidden>
							<s:hidden id="surplusFreeMoney"></s:hidden>
							<s:hidden id="bankCardId" name="#request.nohaveBankId"></s:hidden>
							<s:hidden id="cash" name="#request.cash"></s:hidden>
						    <s:hidden id="isOver24H" name="#request.isOver24H"></s:hidden>
						
							<s:if test="#request.usbankId!=null and #request.usbankId!=''">
							    ****<s:property value="#request.usbankId" />
							    	<a href="javascript:void(0)" class="blue" onclick="to_safe()"
								class="active">修改</a>
							</s:if>
							<s:else>
							      <span class="orange">还没有绑定银行卡</span>
							      <a href="javascript:void(0)" class="blue" onclick="to_safe()"
								class="active">去绑定</a>
							</s:else>
							<span style="color:#888;">(为了您的资金安全，修改银行卡信息后，<s:property value="#request.syschangeBankcard.dataValue"/>小时内不允许提现)</span>
						</dd>
					</dl></li>
				<li class="clearfix text_sp"><label>钱包余额：</label><span>
						<s:if
							test="#request.cash!=null and #request.cash!=''">
							<s:text name="global.format.money">
								  <s:param value="@com.hx.qb.common.util.StringUtils@moneyToKeepDecimals(#request.cash,2)"></s:param>
							</s:text>
						</s:if> <s:else>0.00</s:else> 元
				</span></li>
				<li class="clearfix text_sp"><label>免费提现金额：</label><span>
						<s:if
							test="#request.freeCash!=null and #request.freeCash!=''">
							<s:text name="global.format.money">
								<s:param value="@com.hx.qb.common.util.StringUtils@moneyToKeepDecimals(#request.freeCash,2)"></s:param>
							</s:text>
						</s:if> <s:else>0.00</s:else>
						<s:hidden id="freeCash" name="#request.freeCash"></s:hidden>
				</span>元
				
				<li class="clearfix text_sp"><label>收取的管理费：</label><span
					id="freemoney">0.00 </span> 元 <span style="color:#888;">(转入资金<s:property value="#request.sysdate.dataValue"/>天内提现收取<s:property value="#request.sysfee.dataValue"/>%管理费)</span> </li>
				<s:hidden id="freemoneyval"></s:hidden>
				
				<li class="clearfix"><label>提现金额：</label><input type="text"
					placeholder="输入提现金额" id="withamount"
					onkeyup="getWithdrawFee(this.value),calculate(this.value)"  name="" class="input v"/>&nbsp;元&nbsp;<span
					class="icon_fail v" id="withamountMsg" style="color:red;display:none;"></span></li>
				
				<li class="clearfix"><label>支付密码：</label>
					<input type="password" placeholder="输入支付密码" id="withpay" onkeyup="checkpassword(this.value)" name="" class="input v" onpaste="return false" oncopy="return false"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					<span class="icon_fail v" id="withpayMsg" style="color:red;display:none;"></span></li>
				<li class="clearfix text_sp"><label>到账时间：</label><span>申请提现后在12小时内处理审核 </span></li>
				
				<li><a href="javascript:void(0);" class="btn" id="towithdrwa" onclick="sureWith(1,'<s:property value="#request.userId"/>')">确认提现</a></li>
			</ul>
		</div>
		
        <!--输入提现金额超出设定范围输入手机验证码 -->
		<div id="withdrawPaySms" class="popup dis_no" style=" width:740px; margin-left:-245px; display:none;" onMouseDown="moveEvent(event,this.id)">
			<h3><span>支付手机验证码</span><a href="javascript:void(0);" class="close"></a></h3>
		    <ul class="pop_modify" id="withdrawPaySmsUl">
		    	<li class='clearfix'>
			    	<div class="clearfix">
			    	<label class='tit'>验证码发送手机：</label>
			    	<input  type='text' readonly='readonly'  class='input l' value='<s:property value="#request.usmobileFirst"/>****<s:property value="#request.usmobileEnd"/>'/>
			    	</div>
		    	</li>
		    	<li class='clearfix'><div class="clearfix">
		    	    <label class='tit'>验证码：</label>
			    	<input name='' id='withdrawPaySmsCode' type='text' class='input l' onblur="removeEvent()"  maxlength="6" style="width:120px;">
			    	<a class='send l' id="withdrawPaySmsSend" href='javascript:void(0);' onclick="sendMsg('<s:property value="#request.userId"/>','withdrawPaySmsCode','withdrawPaySmsSend');">免费获取验证码</a>
			    	<span class="icon_fail" id="withdrawPaySmsMsg" style="display: inline-block;background-position: 0 -78px; line-height:38px; padding-left: 16px;margin-left: 10px;"></span>
			    	</div>
			    	<p style="padding:4px 0 0 190px; color:#888;">(手机验证码是6位数字,5分钟内输入有效,请勿泄露)</p>
		    	</li>
		    </ul>
		    <div class="popup_bottom">
		      <a href="javascript:void(0);" class="btn"  onclick="sureWith(2,'')">确定</a>
		    </div>
        </div>
        <div id="withdrawPaySmsD" class="pop_up_bg dis_no"></div>
	</div>
	<!--/main-->
	
	<!--footer-->
	<%@include file="/footer.jsp"%>
</body>
</html>
